<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/8/6
  Time: 17:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>交易记录</title>
    <style>
        table {
            width: 1000px;
            margin: 0 auto;
        }

        #box {
            width: 1000px;
            margin: 0 auto;
            text-align: left;
        }
    </style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>编号</td>
        <td>名称</td>
        <td>价格</td>
        <td>卖家</td>
        <td>买家</td>
        <td>交易时间</td>
    </tr>
    <c:forEach var="someTradelog" items="${someTradelogList}">
        <tr>
            <td>${someTradelog.trid}</td>
            <td>${someTradelog.trname}</td>
            <td>${someTradelog.price}</td>
            <td>${someTradelog.seller}</td>
            <td>${someTradelog.buyer}</td>
            <td>${someTradelog.tradinghour}</td>
        </tr>
    </c:forEach>
</table>
<div id="box">
    <c:if test="${tradePage.currentPage>1}">
        <a href="Tradelog?opr=getAll&currentPage=1">第一页</a>
        <a href="Tradelog?opr=getAll&currentPage=${tradePage.currentPage-1}">上一页</a>
    </c:if>
    <c:if test="${tradePage.currentPage<tradePage.pages}">
        <a href="Tradelog?opr=getAll&currentPage=${tradePage.currentPage+1}">下一页</a>
        <a href="Tradelog?opr=getAll&currentPage=${tradePage.pages}">最后一页</a>
    </c:if>
</div>
</body>
</html>
